<template>
	<view class="u-flex u-row-around">
		<view :style="{color:current==index?'#497aff':'#333'}" @click="Select(index)" v-for="(item,index) in list" :key="index" class="u-text-center">
			<image :src="item.image" style="width: 120rpx;height: 120rpx;"></image>
			<view class="u-margin-top-10">{{item.title}}</view>
		</view>
	</view>
</template>

<script>
	export default{
		name:'w-Carclassify',
		data(){
			return{
				current:0,
				list:[{
					image:'/static/classify_1.png',
					title:'小车'
				},{
					image:'/static/classify_2.png',
					title:'货车'
				},{
					image:'/static/classify_3.png',
					title:'客车'
				},{
					image:'/static/classify_4.png',
					title:'摩托车'
				}]
			}
		},
		methods:{
			Select(index){
				this.current=index;
				this.$emit('current',index+1);
			}
		}
	}
</script>

<style>
</style>
